﻿CREATE PROCEDURE [dbo].[SystemUser_Update]
@SystemUserID uniqueidentifier
, @ModifiedBy uniqueidentifier
, @EmployeeID uniqueidentifier
, @UserName varchar (24)
, @Salt varchar (5000)
, @Password varchar (5000)
, @LastLoginDate datetime
, @LastPasswordChangeDate datetime
, @NextPasswordChangeDate datetime
, @ApprovedBy uniqueidentifier
, @ApprovedDate datetime
, @IsApproved bit
, @IsLoggedOn bit
, @IsLockedOut bit
AS
BEGIN

UPDATE [dbo].[SystemUser]
SET  [ModifiedBy] = @ModifiedBy
, [EmployeeID] = @EmployeeID
, [UserName] = @UserName
, [Salt] = @Salt
, [Password] = @Password
, [LastLoginDate] = @LastLoginDate
, [LastPasswordChangeDate] = @LastPasswordChangeDate
, [NextPasswordChangeDate] = @NextPasswordChangeDate
, [ApprovedBy] = @ApprovedBy
, [ApprovedDate] = @ApprovedDate
, [IsApproved] = @IsApproved
, [IsLoggedOn] = @IsLoggedOn
, [IsLockedOut] = @IsLockedOut
, [ModifiedDate] = GETDATE()
WHERE [Deleted] = 0
AND [SystemUserID] = @SystemUserID


END
